// Copyright (C) Moondance Labs Ltd.
// This file is part of Tanssi.

// Tanssi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Tanssi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Tanssi.  If not, see <http://www.gnu.org/licenses/>


//! Autogenerated weights for pallet_data_preservers
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2024-06-07, STEPS: `16`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `pop-os`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P`
//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024

// Executed Command:
// ./target/release/tanssi-node
// benchmark
// pallet
// --execution=wasm
// --wasm-execution=compiled
// --pallet
// pallet_data_preservers
// --extrinsic
// *
// --chain=dev
// --steps
// 16
// --repeat
// 1
// --template=benchmarking/frame-weight-pallet-template.hbs
// --json-file
// raw.json
// --output
// tmp/pallet_data_preservers.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weight functions needed for pallet_data_preservers.
pub trait WeightInfo {
	fn create_profile(x: u32, y: u32, ) -> Weight;
	fn force_create_profile(x: u32, y: u32, ) -> Weight;
	fn update_profile(x: u32, y: u32, ) -> Weight;
	fn force_update_profile(x: u32, y: u32, ) -> Weight;
	fn delete_profile() -> Weight;
	fn force_delete_profile() -> Weight;
	fn start_assignment() -> Weight;
	fn stop_assignment() -> Weight;
	fn force_start_assignment() -> Weight;
}

/// Weights for pallet_data_preservers using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	/// Storage: `DataPreservers::NextProfileId` (r:1 w:1)
	/// Proof: `DataPreservers::NextProfileId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// The range of component `x` is `[1, 200]`.
	/// The range of component `y` is `[1, 10]`.
	fn create_profile(x: u32, y: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `109`
		//  Estimated: `3694`
		// Minimum execution time: 47_314_000 picoseconds.
		Weight::from_parts(47_311_741, 3694)
			// Standard Error: 6_992
			.saturating_add(Weight::from_parts(16_023, 0).saturating_mul(x.into()))
			// Standard Error: 147_505
			.saturating_add(Weight::from_parts(152_259, 0).saturating_mul(y.into()))
			.saturating_add(T::DbWeight::get().reads(4_u64))
			.saturating_add(T::DbWeight::get().writes(4_u64))
	}
	/// Storage: `DataPreservers::NextProfileId` (r:1 w:1)
	/// Proof: `DataPreservers::NextProfileId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// The range of component `x` is `[1, 200]`.
	/// The range of component `y` is `[1, 10]`.
	fn force_create_profile(_x: u32, _y: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `6`
		//  Estimated: `3471`
		// Minimum execution time: 16_415_000 picoseconds.
		Weight::from_parts(19_640_708, 3471)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	/// The range of component `x` is `[1, 200]`.
	/// The range of component `y` is `[1, 10]`.
	fn update_profile(_x: u32, _y: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3780`
		// Minimum execution time: 46_710_000 picoseconds.
		Weight::from_parts(86_406_571, 3780)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(3_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	/// The range of component `x` is `[1, 200]`.
	/// The range of component `y` is `[1, 10]`.
	fn force_update_profile(_x: u32, _y: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3780`
		// Minimum execution time: 44_033_000 picoseconds.
		Weight::from_parts(47_196_385, 3780)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(3_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	fn delete_profile() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3780`
		// Minimum execution time: 44_490_000 picoseconds.
		Weight::from_parts(44_490_000, 3780)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(3_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	fn force_delete_profile() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3780`
		// Minimum execution time: 45_933_000 picoseconds.
		Weight::from_parts(45_933_000, 3780)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(3_u64))
	}
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn start_assignment() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `373`
		//  Estimated: `3838`
		// Minimum execution time: 27_104_000 picoseconds.
		Weight::from_parts(27_104_000, 3838)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn stop_assignment() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `430`
		//  Estimated: `3895`
		// Minimum execution time: 26_600_000 picoseconds.
		Weight::from_parts(26_600_000, 3895)
			.saturating_add(T::DbWeight::get().reads(3_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn force_start_assignment() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `153`
		//  Estimated: `3618`
		// Minimum execution time: 19_437_000 picoseconds.
		Weight::from_parts(19_437_000, 3618)
			.saturating_add(T::DbWeight::get().reads(2_u64))
			.saturating_add(T::DbWeight::get().writes(2_u64))
	}
}

// For backwards compatibility and tests
impl WeightInfo for () {
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	/// Storage: `DataPreservers::NextProfileId` (r:1 w:1)
	/// Proof: `DataPreservers::NextProfileId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// The range of component `x` is `[1, 200]`.
	/// The range of component `y` is `[1, 10]`.
	fn create_profile(x: u32, y: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `109`
		//  Estimated: `3694`
		// Minimum execution time: 47_314_000 picoseconds.
		Weight::from_parts(47_311_741, 3694)
			// Standard Error: 6_992
			.saturating_add(Weight::from_parts(16_023, 0).saturating_mul(x.into()))
			// Standard Error: 147_505
			.saturating_add(Weight::from_parts(152_259, 0).saturating_mul(y.into()))
			.saturating_add(RocksDbWeight::get().reads(4_u64))
			.saturating_add(RocksDbWeight::get().writes(4_u64))
	}
	/// Storage: `DataPreservers::NextProfileId` (r:1 w:1)
	/// Proof: `DataPreservers::NextProfileId` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// The range of component `x` is `[1, 200]`.
	/// The range of component `y` is `[1, 10]`.
	fn force_create_profile(_x: u32, _y: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `6`
		//  Estimated: `3471`
		// Minimum execution time: 16_415_000 picoseconds.
		Weight::from_parts(19_640_708, 3471)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	/// The range of component `x` is `[1, 200]`.
	/// The range of component `y` is `[1, 10]`.
	fn update_profile(_x: u32, _y: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3780`
		// Minimum execution time: 46_710_000 picoseconds.
		Weight::from_parts(86_406_571, 3780)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(3_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	/// The range of component `x` is `[1, 200]`.
	/// The range of component `y` is `[1, 10]`.
	fn force_update_profile(_x: u32, _y: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3780`
		// Minimum execution time: 44_033_000 picoseconds.
		Weight::from_parts(47_196_385, 3780)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(3_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	fn delete_profile() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3780`
		// Minimum execution time: 44_490_000 picoseconds.
		Weight::from_parts(44_490_000, 3780)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(3_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `System::Account` (r:1 w:1)
	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(229), added: 2704, mode: `MaxEncodedLen`)
	fn force_delete_profile() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `315`
		//  Estimated: `3780`
		// Minimum execution time: 45_933_000 picoseconds.
		Weight::from_parts(45_933_000, 3780)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(3_u64))
	}
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn start_assignment() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `373`
		//  Estimated: `3838`
		// Minimum execution time: 27_104_000 picoseconds.
		Weight::from_parts(27_104_000, 3838)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
	/// Storage: `Registrar::ParaManager` (r:1 w:0)
	/// Proof: `Registrar::ParaManager` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn stop_assignment() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `430`
		//  Estimated: `3895`
		// Minimum execution time: 26_600_000 picoseconds.
		Weight::from_parts(26_600_000, 3895)
			.saturating_add(RocksDbWeight::get().reads(3_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
	/// Storage: `DataPreservers::Profiles` (r:1 w:1)
	/// Proof: `DataPreservers::Profiles` (`max_values`: None, `max_size`: None, mode: `Measured`)
	/// Storage: `DataPreservers::Assignments` (r:1 w:1)
	/// Proof: `DataPreservers::Assignments` (`max_values`: None, `max_size`: None, mode: `Measured`)
	fn force_start_assignment() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `153`
		//  Estimated: `3618`
		// Minimum execution time: 19_437_000 picoseconds.
		Weight::from_parts(19_437_000, 3618)
			.saturating_add(RocksDbWeight::get().reads(2_u64))
			.saturating_add(RocksDbWeight::get().writes(2_u64))
	}
}
